﻿<UserControl x:Class="WpfImageDuplicates.SelectSortControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"              
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <StackPanel VerticalAlignment="Center" Orientation="Horizontal">
            <TextBlock Text="Sort By: " />
            <ComboBox Margin="0,0,0,0" Padding="1,0,1,0" MinWidth="100"
                        x:Name="cboSort" Grid.Column="3" FontSize="9" ItemsSource="{Binding Mode=OneTime, Path=AllSortByOptions}" SelectedValue="{Binding Mode=TwoWay, Path=SortBy}" />
            <TextBlock Text=" Descending? " />
            <CheckBox IsChecked="{Binding Mode=TwoWay, Path=SortDescending}" />

            <TextBlock Text=" and " />
            <ComboBox Margin="0,0,0,0" Padding="1,0,1,0" MinWidth="100"
                        x:Name="cboSort2" Grid.Column="3" FontSize="9" ItemsSource="{Binding Mode=OneTime, Path=AllSortByOptions}" SelectedValue="{Binding Mode=TwoWay, Path=SortBy2}" />
            <TextBlock Text=" Descending? " />
            <CheckBox IsChecked="{Binding Mode=TwoWay, Path=SortDescending2}" />
            <TextBlock Text="  "/>
            <Button x:Name="btnResortNow" Content="_Resort Now" Click="btnResortNow_Click"/>
        </StackPanel>
    </Grid>
</UserControl>
